Method and device for measuring fluid properties using an electromechanical resonator

ABSTRACT

A method and device are described for making in situ measurements of the density and viscosity of downhole fluids at subterranean wells. An oscillator circuit is deployed in the well comprising an amplifier, a feedback loop, and an electromechanical resonator. The electromechanical resonator is a component in the feedback loop of the oscillator circuit, and has a resonance mode that determines the frequency of the oscillator circuit. The electromechanical resonator is also in contact with the fluid such that the density and viscosity of the fluid influence the resonant frequency and damping of the resonator. The frequency of the oscillator is measured by a microcontroller. In one embodiment, the oscillator circuit periodically stops driving the electromechanical resonator such that the oscillation decays and the rate of decay is also measured by the microcontroller. The density and viscosity of the fluid are determined from the frequency and rate of decay of the oscillation. This measurement technique provides a faster response time to fluid changes than is possible with conventional measurement methods, and the fast response time opens up new applications for downhole viscosity and density measurements, including determining PVT characteristics, phase diagrams, and flow rates.

CROSS-REFERENCE TO RELATED APPLICATION

The present invention claims priority to U.S. patent application Ser.No. 62/202,512, filed Aug. 7, 2015, which is hereby incorporated byreference in its entirety.

FIELD OF THE INVENTION

The present invention generally relates to the field of petroleumengineering, and more particularly to a method and device for obtainingin situ measurements at a subterranean well of the viscosity and densityof downhole fluids.

BACKGROUND OF THE INVENTION

A multiplicity of hydrocarbons, brines, other liquids and gases andsupercritical fluids, slurries, foams and emulsions are produced from,found in, used in the construction of, or injected into subterraneanwells. These fluids will be known collectively as downhole fluids.Knowledge of the physical properties of these fluids, such as theirdensity and viscosity, is critical to the drilling, completion,operation, and abandonment of wells. These wells may be used forrecovering hydrocarbons from subsurface reservoirs, injecting fluidsinto subsurface reservoirs, and monitoring the conditions of subsurfacereservoirs.

Fluids include matter in its liquid, gaseous, and supercritical states.Downhole fluids include one or more fluids produced from the earth suchas hydrocarbons, brines, and other fluids occurring in subsurfacereservoirs, as well as fluids such as brines, carbon dioxide, andmethane which may be injected into the subsurface to enhance productionof hydrocarbons or for disposal purposes. Downhole fluids also includeslurries containing liquid and solid components like drilling mud andcement which are used in the construction of wells. One or more downholefluids may be found simultaneously within a subterranean well, as in amultiphase flow, and they may interact forming emulsions and foams.Downhole fluids will also be understood to include substances which arefluids at reservoir temperature and pressure even if they may be solidsat colder temperatures nearer to the surface.

Downhole fluid properties include the viscosity and density of theindividual fluid phases as well as the effective viscosity and densityof the aggregate fluid consisting of multiple fluid phases. Newtonianfluids are well characterized by a single viscosity. In non-Newtonianfluids, such as slurries, the viscosity may vary with the flowconditions, for example with the stress or shear rate applied to thefluid. Properties of non-Newtonian fluids also include rheologicalparameters that describe this dependence of velocity on flow conditions.

Downhole fluid properties are known to vary with temperature andpressure, and the characteristics of this variation is an importantproperty of the downhole fluid. This variation is described, forexample, by the PVT (Pressure-Volume-Temperature) characteristics of thefluid which describe how the density varies with pressure andtemperature, or by the viscosity variation with pressure andtemperature. As pressure and temperature of a fluid changes, the fluidmay undergo state changes, for example condensing from a gas to a liquid(e.g., at the dew point), boiling from a liquid to a gas, ortransitioning to a supercritical or non-supercritical state. Other typesof downhole fluids include structured fluids or dispersions such asemulsions, suspensions and foams, which may undergo structural changesas a function of pressure, temperature, concentration or other chemicalor thermodynamic variables. These changes may be detected dynamically aschanges in their viscosity and/or density. For instance, one fluid maybe dissolved in another and the pressure and temperature conditionsunder which a fluid becomes dissolved or ceases to be dissolved (e.g.,the bubble point) or where solids may precipitate from a fluid is animportant property of the fluid. The depth or location in a well wherethese state changes and this dissolution and precipitation occur iscritical information for optimally producing fluids from the well orinjecting fluids into the well. Additionally, the density (or APIgravity) and viscosity of oil is indicative of its type and value and,as a function of depth, may be used to understand reservoir structureand compartmentalization. Asphaltene content may also be inferred fromviscoelastic properties of the produced hydrocarbons. Understanding thePVT characteristics of produced fluids is also important for optimizingsurface facilities design, including deciding the optimal pressure forsurface separators. State change, dissolution, and precipitation aregenerally accompanied by a change in viscosity and density of the fluidso that a measurement of viscosity and density as a function of pressureand temperature can identify the temperature and pressure at which thesechanges occur.

Determining the viscosity and density of fluids in a subsurfacereservoir provides important data for optimizing production andreservoir models. Typically, produced fluids are sampled at the surface.Then, in a laboratory, downhole temperature and pressure conditions areapplied to the samples and their viscosity, density, and otherproperties are measured. However, when hydrocarbon liquids from thereservoir are brought to surface temperature and pressure (e.g., as theytravel up a well) dissolved gas is released and asphaltenes mayprecipitate. These changes can be difficult to accurately reverse in thelaboratory, so that the viscosity measured in the laboratory may bedifferent from the viscosity that the fluids had in the reservoir, evenif the laboratory measurement is made at reservoir temperature andpressure. Furthermore, the process of acquiring samples at a well,transporting them to a laboratory, and making measurements there iscostly and time consuming. In addition, the need to transport samples toa lab to acquire fluid properties data prevents these data from beingused in real time to respond to changing conditions at the well.Accordingly, there is a need for a sensor that can make an in situmeasurement of downhole fluid viscosity and density in downhole or fieldconditions.

The viscosity and PVT characteristics (or phase diagram) of downholefluids are typically measured in laboratories and these measurements areused to infer the viscosity and density of the fluid in the reservoirand along the wellbore, and to infer where significant transitions suchas state changes, bubble points, and dew points will occur. However, dueto the irreversible changes that can occur in fluids as they are broughtto the surface as well as uncertainty around exactly where certainconditions of pressure and temperature will be met in the actual well,these inferences may be inaccurate. See Freyss, Henri et al., “PVTAnalysis for Oil Reservoirs” RESERVOIR ENGINEERING, The TechnicalReview, Vol. 37 Number 1, Pages 4-15 Published: Jan. 1, 1989, which isincorporated by reference in its entirety, for a discussion of theviscosity and PVT characteristics of downhole fluids in connection withhydrocarbon recovery. Accordingly, there is a need for a small, fast,and accurate sensor that can measure hydrocarbon viscosity and densityalong a producing well, as these data combined with temperature,pressure, and depth/location along the well can be used to determine thetrue locations and conditions where significant transitions occur.

Downhole fluid flows are often two-phase or multi-phase fluid flows,consisting of two or more distinct or immiscible fluids. The flow regime(e.g., slug flow, laminar flow, bubbly flow) depends on the rate of flowof the different phases as well as the viscosity and density of thephases. The flow regime can significantly impact the effectiveness anddurability of downhole equipment, such as artificial lift systems. Insome flow regimes the flow rates of the different phases may be coupledwhile in others the flow rates may be uncoupled. Knowing the volume rateof flow of each phase is important for optimizing production and surfacefacilities, as well as detecting production problems such as waterbreakthrough. The simplest flow monitoring sensors measure the totalflow rate (without distinguishing between the phases) and measure thevolume percent of the different phases. The flow rates of the individualphases are determined by multiplying the total flow by the volumepercent of each phase. This measurement is only accurate when all phasesmove at the same velocity. In some flow regimes, the different phasesmove at different velocities, which can lead to inaccurate measurements.Accordingly there is a need for a small, inexpensive sensor that canmeasure the instantaneous viscosity and density of the fluid it contactsto aid in the determination of flow regime, the relative abundance ofeach phase, the shape and size of the flow structures of each phase, andthe degree of velocity coupling between fluid phases. Small device sizeis also necessary due to limited space inside wells particularly in ascenario where permanent or tetherless sensing is desired while notsignificantly interfering with hydrocarbon production. The inventionaddresses these and other needs in the art.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, a method and deviceare disclosed to make in situ determinations of fluid properties at asubterranean well, where, in various embodiments, the fluid propertiesare measured at or near the depth of a subsurface reservoir penetratedby the well, in the well but above the reservoir depth, at the surfacenear the well, or in surface facilities connected by pipelines or tubingto the well. The method is performed by deploying an electromechanicalresonator such that it is at least partially immersed in the downholefluids. In one embodiment, the electromechanical resonator might behoused in a chamber and downhole fluids are selectively drawn into thechamber and optionally separated and/or conditioned (chemically orphysically) prior to performing the measurement.

The electromechanical resonator is oscillated at its resonance frequencyby powering an oscillator circuit which incorporates the resonator asits frequency defining element. The frequency of the oscillation anddamping of the oscillation produced by the oscillator circuit is thenmeasured. The frequency and the damping of the electromechanicalresonator are related to the viscosity and density of the downhole fluidby employing a processor configured by code to utilize at least one of:(1) theoretical equations relating frequency and damping to fluidviscosity and density; and (2) empirical curve fitting based oncalibration measurements of the resonance frequency and damping of theelectromechanical resonator in reference fluids having a known viscosityand density.

In a further aspect of the present invention, a method and device aredisclosed for determining the PVT characteristics or phase diagram of adownhole fluid, or a dispersed fluid-fluid (emulsion), solid-fluid(suspension), or gas-fluid (foam) system. In one embodiment measurementsof density and viscosity are taken as the device occupies differentdepths in the well, such that the downhole fluid properties can bemeasured at the differing pressure and temperature encountered at eachdepth. Based on these measurements at discrete pressure and temperaturepoints, the full PVT characteristics or phase diagram is reconstructedby interpolation. Typically this interpolation is accomplished byselecting from a family of theoretical PVT characteristics the one whichmost nearly matches the measured properties along the well.Alternatively the family of PVT characteristics may be empiricallydetermined based on PVT characteristics measured in the laboratory onsimilar fluids; the PVT characteristic which best matches the limitedset of data acquired in the well is selected from this family andassumed to describe the fluid at the well.

According to a further aspect of the present invention, a method anddevice are disclosed for determining properties of a fluid. The methodis performed by exposing an oscillator circuit to an uncharacterizedfluid. The oscillator circuit used comprises the following: (1) anamplifier (or a logic gate functioning as an amplifier) with an outputand an input; (2) a feedback loop between the output and input of theamplifier or logic gate; and (3) an electromechanical tuning forkdisposed within the feedback loop such that the resonant frequency ofthe tuning fork determines the oscillation frequency of the oscillatorcircuit. The oscillator circuit is then activated so that the tuningfork reaches its resonant frequency in the uncharacterized fluid. Theoscillator frequency is measured. Due to the effect of fluid massloading on the electromechanical resonator, the oscillator frequency isan indication of the density of the fluid—lower frequencies mean theresonator is in a denser fluid while higher frequencies mean that thefluid by the resonator is less dense. The damping of the resonator isalso measured. In one embodiment, the damping of the tuning fork in theuncharacterized fluid is determined by causing the oscillator circuit tostop delivering power to sustain the oscillation such that theoscillation decays with time. The envelope, decay time or decay rate ofthe decaying oscillation is measured to determine the damping. Inanother embodiment, the feedback circuitry has an automatic gainadjustment that keeps the oscillation at constant amplitude. Energydissipation, or damping, is determined based on the supplied gainrequired to maintain this amplitude. Based on the measured damping theviscosity of the fluid is calculated. Less damping means the fluid atthe resonator is less viscous, while more or faster damping means thefluid around the resonator is more viscous.

In some embodiments, the uncharacterized fluid is located downhole. Inorder to determine the properties of the fluid in this embodiment, theoscillator circuit must be disposed downhole. In a further aspect of thepresent invention, the oscillator circuit is supported by a wirelinetool that is capable of making measurements at multiple points in thewell. The oscillator circuit may also be supported by an untetheredsensor platform that is capable of making measurements at multiplepoints in the well. In a further embodiment of the present invention,the sensor and the circuitry are permanently deployed downhole,typically as part of a smart completion where a microcontroller and abattery or other power source are used to take measurements.

In a further embodiment of the present invention, a method and devicefor determining the volume fraction and flow rates for each phase in amultiphase flow are disclosed. The method includes the step ofdetermining the composition of the fluid, wherein the fluid is amultiphase flow.

In a further embodiment, oleophobic or hydrophobic coatings such aspyrelene or fluorinated compounds are used to preferentially measure aparticular phase (brine or oil) in a multiphase flow. In one embodiment,an omniphobic coating or super-repellant surface is applied to theelectromechanical resonator to reduce the response time in sensing achange in fluid type between hydrocarbons and brine.

In still a further aspect of the invention, an apparatus for determiningproperties of an uncharacterized fluid, comprises an oscillator circuitcomprising an amplifier having an output and an input, a feedback loopbetween the output and input of an amplifier or a logic gate, and anelectromechanical resonator disposed within the feedback loop such thata resonant frequency of the resonator defines the frequency of theoscillator circuit. The apparatus further includes a means for measuringthe period (or frequency) of the oscillation, typically using the timerin a microcontroller which has a stable (e.g., crystal oscillator based)time base. The apparatus further includes a means for determining anenergy loss parameter related to the rate at which the electromechanicalresonator is dissipating energy.

Two examples of said means for determining an energy loss parameter aredescribed without limiting the scope of the invention. In the firstexample, the apparatus includes a means to enable and prevent theoscillator circuit from driving the electromechanical resonator and ameans to determine the decay rate of the oscillation when the resonatoris not driven. The decay rate is the required energy loss parameter asit reflects the rate at which energy losses are occurring from theelectromechanical resonator. In the second example, the apparatusincludes an automatic gain control (AGC) circuit which maintains theoscillation amplitude at a fixed level, and a means to measure the gaincontrol voltage applied to the AGC. An AGC circuit typically has aninput, an output, and a gain control voltage input. The output is equalto the input multiplied by a certain gain, and the magnitude of thatgain is determined by the gain control voltage input. The gain controlinput voltage is derived from the amplitude of the oscillation, forexample by an envelope detector, such that the gain is increased whenthe amplitude is too low and the gain is decreased when the amplitude istoo high. The gain control voltage at the AGC required to sustainoscillation at a fixed amplitude is measured as the energy lossparameter, as it is a measure of the rate at which energy losses areoccurring from the electromechanical resonator.

In one embodiment, the apparatus comprises a microcontroller with codedisposed to convert the period of oscillation and energy loss parameterdirectly to the density and viscosity of the uncharacterized fluid, forexample by comparing their values to a set of calibration measurementswhere the period and energy loss parameter were measured on fluids ofknown density and viscosity. In another embodiment, the apparatuscomprises a microcontroller with code disposed to store or communicatethe period of oscillation and energy loss parameter without convertingthem to density and viscosity. The latter is the preferred embodiment ifthe conversion can be performed later in software and if any controldecisions that must be made based on measured density and viscosity(such as turning on a valve if density or viscosity are too high) can bemade based on the surrogate properties of period and energy lossparameter without converting these explicitly to density and viscosity.

BRIEF DESCRIPTION OF THE DRAWING FIGURES

FIG. 1 illustrates an oscillator circuit according to a firstarrangement;

FIG. 2 illustrates electrical waveforms recorded within an oscillator ofthe first arrangement;

FIG. 3 illustrates an oscillator circuit according to a secondarrangement;

FIG. 4 illustrates a tuning fork resonator;

FIG. 5 illustrates an example of measured viscosity data;

FIG. 6 illustrates an example of measured density data;

FIG. 7 illustrates the Butterworth-Van Dyke model for piezoelectricresonators;

FIG. 8 illustrates an oscillator circuit where a variable negativeresistance is simulated and controlled in a feedback loop to maintain aconstant oscillation amplitude;

FIG. 9 shows the addition of parallel and series electrical impedancesto the resonator as can be required to enable the inventive circuit tooscillate when the resonator is in liquids or otherwise has largedamping;

FIGS. 10A and 10B illustrate two of the vibrational modes of a tuningfork oscillator and FIGS. 10C and 10D illustrate tuning fork responseunder in-plane shear actuation with external piezoelectric transducerwith the arrows pointing in direction of actuation;

FIGS. 11A-C illustrate a three electrode (INPUT, GROUND, OUTPUT) tuningfork configuration and response for decoupling of drive from sensingsignal;

FIGS. 12A-C illustrate a double-sided (back and front) three electrode(INPUT, GROUND, OUTPUT) tuning fork configuration and response fordecoupling of drive from sensing signal; and

FIG. 13 is a differential electrical circuit diagram with the tuningfork block representing the electromechanical model of the tuning forkwith the parasitic capacitance, C1.

DETAILED DESCRIPTION OF CERTAIN EMBODIMENTS OF THE INVENTION

According to a broad aspect of the present invention, the inventorsrecognized that a small, fast, and accurate sensor capable of measuringviscosity and density and mounted on a platform which enabled it toobtain measurements at various depths along a producing well can, forexample, be used to 1) map the PVT characteristics of downhole fluidsand identify the locations where the dew point, bubble point, and/orother important state changes and transitions in the fluid propertiesoccur along the wellbore, 2) map the PVT characteristics of a dispersedfluid-fluid (emulsion), solid-fluid (suspension), gas-fluid (foam)system through rapid measurement of changes in density and viscosity 3)determine more accurately the true viscosity and density of thereservoir fluids at reservoir conditions, and 4) determine separatephase densities and viscosities and a time series of the instantaneousphase present at the sensor in a multi-phase flow, from which the flowregime, the shapes and sizes of the flow structures of each phase, andthe volume flow rates of each phase could be more accurately inferred.

In accordance with one embodiment of the invention, the device comprisesa platform for positioning the sensor at a desired depth in ansubterranean well, an electromechanical resonator, an oscillator circuitwhich incorporates the electromechanical resonator as itsfrequency-defining element, and a microcontroller which measures thefrequency (or period) of oscillation of the oscillator circuit andmeasures the damping of the oscillation. Such an embodiment is adeparture from prior art approaches in that the electromechanicalresonator defines the resonant frequency of the oscillator circuit, asopposed to conventional arrangements which have an oscillator circuitwhich is distinct from the resonator and must be tuned until theresonance frequency of the electromechanical resonator is found. Theembodiment is also different in that the damping of the oscillation orother energy loss parameter is measured directly to determine the energylosses or damping caused by the fluid contacting the resonator.

An oscillator circuit typically comprises an amplifier with at least onefeedback path from the output of the amplifier to an input of theamplifier. A frequency defining element (such as a quartz crystal) istypically included along one such feedback path in such a way as tocause a sustained oscillation at the resonance frequency of thefrequency-defining element. This sustained oscillation is produced whenthe total phase shift around the loop including the frequency definingelement and the amplifier is 360 degrees or a multiple thereof and thegain around the loop including the frequency defining element and theamplifier is no less than 1.

The inventors recognized that the circuit arrangement of including theelectromechanical resonator within an oscillator circuit as the primaryelement which determines the frequency of the oscillation offerssubstantial benefits over prior art methods, including, first, that itis not necessary to search multiple frequencies to find the resonantfrequency of the resonator as the oscillator circuit begins oscillationat the required resonant frequency. This makes the measurement using theinventive method much faster than with conventional methods. Second, thetotal amount and complexity of circuitry required to accomplish themeasurement is greatly reduced. Third, a precision oscillator capable ofproducing accurately controlled frequencies with fine frequencyresolution is not required; the inventive circuit simply oscillates atthe desired frequency, and this frequency can be measured with a simplecrystal-based timer, a device already available on many smallmicrocontrollers. Fourth, incorporating the resonator into theoscillator circuit as the frequency-defining element means thatsignificant energy becomes stored in the resonator, which provides astrong signal for measuring the damping due to the surrounding fluid. Bycontrast, driving the resonator with an impulse or step function toobserve its resonance frequency and damping produces a much smallersignal as only a small fraction of the energy in the impulse or stepfunction would be within the resonant frequency band of the resonator.Fifth, among other benefits, incorporating the resonator into thefeedback loop of an amplifier in the oscillator circuit provides anopportunity with efficient circuit design to utilize the same amplifierto provide amplification of the sensor signal during the dampingmeasurement.

There are various ways that the damping can be measured. In oneembodiment, the damping is determined by briefly ceasing to electricallydrive the resonator so that the oscillation decays in amplitude and therate of the amplitude decay can be measured. For instance, this can beachieved using a NAND-gate based oscillator circuit, as shown in FIG. 1and described in more detail below. An envelope detector circuitry canbe employed to provide the oscillation amplitude which can then bedigitized and fit to an exponential decay curve to determine the dampingcoefficient. Alternatively, two voltage comparators and a timer can beused to determine how long it takes the envelope to decay between toreference voltage levels and this time can be used to determine thedamping coefficient. Alternatively, constant oscillation amplitude canbe maintained by using an automatic gain adjustment circuitry that setsthe gain of the previously mentioned amplifier in the closed loop. Inthis alternative measurement technique, there is no need to stop theoscillation to measure the decay time; instead, the amount of gainneeded to sustain the constant amplitude can be used to determine thedamping coefficient due to the fluid surrounding the electromechanicalresonator. The gain of the automatic gain control amplifier can bedetermined by digitizing the gain adjustment signal which controls itsgain and using a prior calibration measurement relating the gainadjustment signal to the amount of gain that the amplifier produces.

According to one embodiment, the sensor can comprise anelectromechanical device, which is in contact with the fluid, and whichis a component of the circuit which drives and detects the oscillatorymotion of the device, as a function of time, as the sensor interactswith the fluid. The motion of the electromechanical device is influencedby the fluid and a quantitative relation is established directly betweenthe fluid viscosity and density and the resonant frequency and dampingof the electromechanical resonator. Alternatively, if the fluidviscosity and density are well known functions of temperature andpressure (as for example with methane), a direct relation betweenfrequency and damping can be established with the temperature andpressure of the fluid, allowing real-time knowledge of its thermodynamicstate and other properties related to this state (bubble-point,dew-point, GOR, etc.).

In particular, a piezoelectric tuning fork can be used as theelectromechanical oscillating device. One example of a suitablepiezoelectric tuning fork is described in U.S. Pat. No. 7,562,557 toBennett, et al., which is hereby incorporated by reference in itsentirety. However, the invention is not limited to a particularresonator element as long as it can be integrated into an oscillatorcircuit as part of the oscillator itself. The mechanical properties ofthe fork, which is a two terminal device, can be described by theButterworth-Van Dyke model (shown in FIG. 7) as a series resistance (R),inductance (L) and capacitance (C) circuit (RLC circuit) representing,respectively, the mechanical damping, mass, and compliance of thedevice, with a parallel capacitance (CO) which represents the electricalcapacitance of the device including the capacitance between theelectrodes of the device, including any stray capacitance between theelectrical leads and capacitance due to the dielectric mediumsurrounding the device. This model represents a resonant system andestablishes a direct relation between the mechanical and the electricaldomain through the piezoelectric action. When CO is much larger than C,it becomes difficult to make a highly damped resonator (such as aresonator in a viscous liquid) oscillate. Accordingly, the preferredresonator design utilizes a choice of piezoelectric material, shape, anddimensions to minimize CO relative to C. The preferred resonator alsomaintains a high Q factor (quality factor) of the resonance when inliquids, for example, by having reduced contact area with the liquid.Additionally, an inductor (or a circuit which simulates the action of aninductor) can be placed in parallel or series with the resonator tocancel the action of CO near the resonant frequency, thus making iteasier for the oscillator circuit to resonate when the fork is in ahighly viscous liquid. Alternatively, a reference capacitor that has anidentical or very similar capacitance with the piezoelectricoscillator's parasitic capacitance can be used in a differentialmeasurement scheme (FIG. 13). In this technique identical input signalsare fed to the piezoelectric resonator and the reference capacitor, andtheir outputs are subtracted from each other to cancel out the parasiticcapacitance contribution. Even when the electromechanical responsesignal is very small compared to the parasitic signal, subtraction andamplification can enable oscillation even in a high damping environment.A differential amplifier can be used for subtraction. In one embodiment,the reference capacitor can be a second tuning fork with its forksclamped or held by epoxy. This ensures that there is no majorcontribution from the piezoelectric (electromechanical) response of thereference capacitor around the frequencies of interest but only from theparasitic capacitance. A near identical capacitor can be made bypatterning electrodes on the same type of piezoelectric substrate withthe same geometry as the electromechanical resonator that does not havethe tuning fork shape; thus, it does not possess any resonance frequencyaround the tuning fork's resonance frequency.

In another embodiment, driving and sensing functions of theelectromechanical resonator can be decoupled. This can be done usingdifferent physical effects for driving and sensing such as using variouscombinations of transductions between electrical, magnetic, mechanicaland optical domains. Or, if the same transduction method is used fordriving and sensing, decoupling can be also done by spatially separatingthe regions of driving and sensing. Depending on the used transductionthe necessary separation length may differ. In the specific example ofpiezoelectric tuning fork, it can be driven to its resonance by severalmeans and resulting mechanical deformation on the piezo material can besensed as a voltage output via the patterned electrodes. This methodminimizes the parasitic capacitance and direct electrical signalcoupling of the input signal to the output. In the simplest form, thetuning fork can be rigidly mounted on a mechanical shaker, such as ashearing piezo transducer. Applying an electric signal to the shearingpiezo at the resonance frequency of the tuning fork, the motion of theshearing piezo can be mechanically coupled to the tuning fork and thetuning fork's resonance mode can be excited. As the tuning fork deforms,it produces a spatial charge distribution along its piezoelectriccrystal which can be picked up as a voltage difference between thepatterned electrodes on the tuning fork. The coupling efficiency of theinitial motion to the desired resonance frequency depends on theorientation of the tuning fork with respect to the direction of motionof the shearing piezo and the stiffness of the bonding between the twobodies. For example, to excite the scissoring mode of the tuning forkwithout exciting the fundamental cantilever mode of the whole tuningfork body, shearing motion direction should be orthogonal to thescissoring motion direction as shown in FIGS. 10A-D. Alternatively, theelectrodes can be patterned on the tuning fork so that driving andsensing can be performed by far electrodes as in FIGS. 11A-C. In thisthree electrode scheme, the parasitic capacitance between input andoutput ports can be several orders of magnitudes smaller than theparasitic capacitance of a two terminal device with a similar geometry.By comprising the fabrication complexity, a second set of electrodes canbe patterned on the back side of the tuning fork. The front faceelectrodes can be used for driving and the back side electrodes can beused for sensing. In this case the electromechanical conversionefficiencies can be further increased as shown in FIGS. 12A-C.

According to one aspect of the operation of such a circuit, theresonator is incorporated into an oscillator circuit, which is thenturned on. The oscillator circuit can include the circuits of FIGS. 1and 3, which are described in more detail below. Through a continuousfeedback mechanism from the circuit, the tuning fork starts itsoscillation from small fluctuations in its motion that overcome thedamping from the environment and grow until a maximum amplitude isreached. At this point, the feedback mechanism is switched off and theoscillation of the resonator decays due to the environmental damping.The process is repeated continuously and the frequency and decay time ofoscillation is obtained at each switching cycle.

The model that describes the oscillation decay is that of a dampedun-driven harmonic oscillator, whose solution for the velocity ofoscillation (proportional to the current generated by the piezoelectriceffect) is given by:

v(t)=Ae ^(−t/τ)cos(ωt+φ),

where φ is the phase of oscillation, the decay time constant, τ, isrelated to the damping by the fluid, and the frequency, ω, is related tothe effective mass of the resonator including the added mass of fluiddragged by the resonator. These quantities are related to the qualityfactor, Q, of the oscillator by

$\tau = \frac{2Q}{\omega_{0}}$ and$\omega = {\omega_{0}{\sqrt{1 - {{1/4}Q^{2}}}.}}$

In a liquid environment, Q becomes very small, say, of order 10. Usingthe equation above, and for an estimated natural frequency, ω₀, in thetens of kilohertz, say, 3×10⁴ KHz, it can be appreciated that a timeconstant of approximately one millisecond is obtained, allowing for avery quick measurement and “real-time” information of the properties ofthe fluid to be calculated and reported to downstream systems, such ashardware-processor based machines that execute or otherwise implementcode to configure those machines to process the fluid characteristicsdata received from such a circuit within a producing well.

Various oscillator circuits can be adapted to work with theelectromechanical resonator sensor. The oscillator circuit must be ableto oscillate for all environments in which measurements are to beobtained. For liquid environments, the Q (i.e., quality factor) of theresonator is small (e.g., on the order of 10), and some oscillatorcircuits may not provide enough amplification to sustain an oscillation.In such cases, additional amplification can be employed. For example, ifan unbuffered logic gate is not able to provide sufficient amplificationto sustain oscillation in lossy environments, it can be replaced with abuffered logic gate or with multiple logic gates in series to providethe additional amplification required for oscillation. In some cases,when the Q factor of the resonator is small due to being in a viscousfluid, it may not produce sufficient phase shift to cause an oscillatorcircuit to oscillate. In this case, an additional impedance such as areactance can be added in parallel and/or in series with the resonatorto provide the additional phase shift. As shown in FIG. 9, an impedanceZp is added in parallel with the resonator X, and an impedance Zs isadded in series with the resonator X. It will be understood that the“SENSOR” shown by the crystal schematic symbol in FIG. 1 and FIG. 3includes both the electromechanical resonator and the parallel and/orseries impedance that must be added to the resonator to cause thecircuit to oscillate in the fluids of interest. Persons skilled in theart will recognize that the impedance can be added as networks of one ormore resistors, capacitors, and inductors or as active circuits whichemulate the current-voltage relationships of these networks. Activecircuits have certain advantages as they can create current-voltagerelationships which cannot be created by passive components such as a“negative resistor.” Small active circuits can also emulaterelationships where the corresponding passive component would be muchlarger, such as when emulating a large inductor. In one embodiment, inthe circuit shown in FIG. 1, the “SENSOR” consists of an inductor inseries with the resonator to enable the circuit to operate in fluidswith higher viscosities.

In one embodiment, an oscillator circuit suitable for use in connectionwith the present invention includes a means to cause it to stop drivingthe electromechanical resonator so that the decay of the oscillation canbe observed. For instance, the feedback loop containing theelectromechanical device can be opened, or other circuit components inthe oscillator circuit opened, shorted, or otherwise changed so that theresonator changes from a driven state to an undriven state. Thecircuitry of the oscillator circuit, or separate circuitry, can includea means to measure the frequency of oscillation and a means to measurethe decay rate of the oscillation. Two such embodiments are discussedbelow.

Referring to FIG. 1, a circuit 100 includes a NAND logic gate 102configured, as described below, as an amplifier, resistors 104 and 106,and capacitors 108 and 110 connected around a “sensor” 112 whichcomprises an electromechanical resonator that both forms a part of theoscillator circuit in order to define the oscillation of the circuit andwhich is configured to be in direct contact with a fluid to be measured,such that the effect of the fluid on the behavior of the resonator canbe measured to determine characteristics of the fluid. The gain in theoscillator circuit 100 is provided by the NAND logic gate (U1) 102, thatis, the NAND/logic gate functions as an amplifier for the circuit. Theoscillator is disabled by a logical low level on the ON/OFF* input andenabled by a logical high level on the ON/OFF* input. This input can besupplied by a digital output from a microcontroller, for example, tocontrol whether the oscillator circuit is in a driven or undriven mode.After oscillation, the undriven mode is suitable for gathering dampingdata and determining fluid characteristics, such as using the formulasnoted above or other equations that benefit from the damping data. The“TO TIMER” output of the circuit has a square wave at the frequency ofoscillation. This output can be provided, for example, to a timer inputof the microcontroller so that the frequency of the oscillation can beaccurately measured by the timer system of the microcontroller. The “TOADC” output of the circuit can be provided to an analog-to-digitalconverter to sample the decaying oscillation and determine the damping,if desired.

FIG. 2 shows an output graph 200 that includes two waveforms 202 and 204from the circuit 100. When the ON/OFF* input is high 206, theoscillation begins, eventually reaching a stable amplitude as can beseen in waveform 202. Then when the ON/OFF* input goes low 208 (attime=0 seconds in the diagram of FIG. 2), the NAND gate is disabled, andthe oscillation decays, as shown in the waveform 204. The waveform at TOADC output is shown at 202, 204. These data illustrated in FIG. 2 weremeasured with the sensor in vacuum. The time to begin oscillation andthe decay times are much faster when the sensor is in liquid. In anyevent, the damping rate of the electromechanical device in a referenceliquid, and at a prescribed temperature and pressure, can be obtainedfor benchmarking purposes, such as to calibrate a given sensor 112.

FIG. 3 shows another embodiment in which circuit 300 is provided. Thecircuit 300 includes an analog switch 302, an operational amplifier 304,resistors 306, 308, and 310, and diodes 312 and 314. Again, in salientpart, the circuit 300 includes a “sensor” 316 which comprises anelectromechanical resonator both forms a part of the oscillator circuitin order to define the oscillation frequency of the circuit and which isconfigured to be in direct contact with a fluid to be measured, suchthat the effect of the fluid on the behavior of the resonator can bemeasured to determine characteristics of the fluid. The gain in theoscillator circuit 300 is provided by the operational amplifier (op amp)(U2) 304. When there is a logical low level at the ON/OFF* input, theanalog switch U3 302 is open and the oscillation is not driven (i.e. itdecays). In this mode, the op amp 304 functions as a current-to-voltageconverter, providing a voltage on the TO ADC output that is proportionalto the decaying current oscillation from the sensor. When there is alogical high level on the ON/OFF* input, the analog switch U3 302 isclosed allowing positive feedback which causes a sustained oscillationat the resonant frequency of the sensor. The ON/OFF* input can besupplied by a digital output from a microcontroller. The “TO ADC” outputof the circuit can be provided to an analog-to-digital converter whichsamples the sustained and decaying oscillations and enables a processorto determine the frequency of oscillation and the decay time. Diodes 312and 314 (D1 and D2) prevent the op amp output from being driven intosaturation. Without these diodes, there would be a reduction inoscillation frequency due to the time it takes the op amp to come out ofsaturation.

In another embodiment, the damping is determined based on the amount ofnegative resistance which must be added in series or parallel with theresonator to sustain the oscillation at constant amplitude (e.g., thecircuit of FIG. 3 can be modified to accomplish this operation, wherethe resistor (308)—which defines the negative resistance—is replaced bya variable resistance device, such as an N-channel enhancement modeMOSFET, and the gate voltage of the MOSFET (which determines thedrain-source resistance in the linear region of operation) is adjustedto keep the amplitude of the amplifier output constant. FIG. 3 thusshows a circuit of an oscillator using an operational amplifier. Theresistance which the MOSFET is supplying, and, therefore, the negativeresistance required to keep the oscillation amplitude constant, can bedetermined by sampling the gate voltage on the MOSFET). In anotherembodiment, the damping is determined based on the amount of power thatmust be added to the resonator to sustain the oscillation at constantamplitude. In another embodiment, the damping is determined based on theamount of gain that must be applied in the feedback loop containing theresonator within the oscillator circuit to sustain the oscillation atconstant amplitude.

Suitable platforms that can deliver a sensor to a desired location orset of locations in a producing well include wireline tools, as areknown to persons skilled in the art, untethered sensors, as described inco-pending U.S. patent application Ser. No. 15/143,128, filed on Apr.29, 2016, entitled METHOD AND DEVICE FOR OBTAINING MEASUREMENTS OFDOWNHOLE PROPERTIES IN A SUBTERRANEAN WELL, which is hereby incorporatedby reference as if set forth in its entirety herein, or on network nodesat different depths in a permanently deployed network of sensorsdisposed within the well. The structure of the device makes itparticularly useful for remote, downhole operations as the device can bemade to fit into a small package (e.g., resonator and circuit can fit inless than 1 cc volume), and consume little power (e.g., approximately 1micro Joule per measurement).

In one embodiment, the circuit of FIG. 3 is modified as shown in FIG. 8to implement automatic gain control. The resistor (308 in FIG. 3) whichsets the negative resistance seen at the non-inverting input of theoperational amplifier can be replaced by an N-type enhancement modeMOSFET, in which the gate voltage supplied to the MOSFET is the gaincontrol voltage and is the output of an envelope detector applied to theoscillation at the operational amplifier output. Thus, the MOSFET gategets a voltage that depends on the amplitude of the oscillation. If theamplitude of the oscillation decreases, the gate voltage will decrease.This will increase the drain-to-source resistance of the MOSFETincreasing the negative resistance added to the resonator and increasingthe amplitude of the oscillation. If the amplitude of the oscillationincreases, the gate voltage will increase. This will decrease thedrain-to-source resistance of the MOSFET, decreasing the negativeresistance added to the resonator and decreasing the amplitude of theoscillation. Thus, the amplitude of the oscillation will be maintainedat a constant level using a circuit of such an arrangement. The negativeresistance required to maintain the constant amplitude oscillation canbe determined by measuring the gate voltage applied to the MOSFETcombined with a calibration curve that gives the drain-source resistanceof the MOSFET as a function of its gate voltage. In this regard, ahardware processor can execute or otherwise implement code therein toidentify resistance from a calibration curve (or a function thatrepresents the calibration curve), based on the measured gate voltage.

In one embodiment, the circuit alternatively can be configured to drivethe resonator such that the oscillation is initially established and atleast briefly sustained, and then ceases to drive the resonator suchthat the oscillation is permitted to decay (e.g., using the circuit ofFIG. 1, for example) so that a decay measurement can be taken orotherwise completed. In another embodiment, the gain of the circuit isadjusted to maintain a constant amplitude of oscillation and the amountof gain required is measured as an indicator of the amount of damping.This is because greater damping requires greater gain to sustain aconstant oscillation. In another embodiment, a circuit is configured tosimulate a “negative resistor” connected to the resonator. The amount ofnegative resistance is adjusted automatically to maintain a constantamplitude oscillation, and the amount of negative resistance required ismeasured as an indicator of the damping. This can be employed because agreater negative resistance is required to offset a greater dampingenergy loss which can be thought of as a (positive) resistor internal tothe resonator.

In one embodiment the variable resistor circuit can be as shown in FIG.8, in which the adjustable resistor is actually the drain-sourceresistance R_(DS) of a MOSFET, which is adjusted by the gate voltage ofthe MOSFET. The gate voltage of the MOSFET in this embodiment isgenerated by an envelope detector on the amplifier output, so that alarger amplitude output results in a larger gate-source voltage andtherefore a smaller R_(DS) which causes the oscillation amplitude todecrease until a R_(DS) becomes exactly right to offset the damping inthe resonator. The gate voltage is sampled by an A/D converter in themicrocontroller which can be related to the value of R_(DS) andtherefore the amount of damping in the resonator, for instance, usingcode executing within the microcontroller which relate the values justdescribed. The frequency of the oscillation can also be measured by themicrocontroller. From this measurement and the value of R_(DS), thefrequency which the undriven decaying oscillation has can be calculated.

In one embodiment, a system and method is provided that can also measuretemperature and pressure in addition to density and viscosity of allfluids present in a multiplicity of locations along a well bore. Thetemperature and pressure measurements are implemented by includingtemperature (for example RTD) sensors and pressure transducers that arecommercially available. Their readings are measured by ananalog-to-digital converter that interfaces to the microcontroller inthe device such that temperature and pressure data can be recorded ortransmitted along with density and viscosity.

Although viscosity is not plotted in PVT diagrams, it can be used as anindicator of when a particular state change, bubble point, dew point,etc. has occurred. An untethered sensor ball (such as the one describedin the co-pending U.S. patent application Ser. No. 15/143,128,referenced above, for example) provides an inexpensive solution formeasuring fluid properties at all pressures and temperatures between thesurface and any given reservoir depth. By measuring temperature,pressure, and the density and viscosity of all fluid phases that areencountered while traveling down the well from the surface to theselected reservoir depth, the device, methods and system of the presentinvention can reconstruct the viscosity and phase diagram informationfor the produced fluids along the most important pressure—temperaturetrajectory, i.e., that found in the wellbore.

It is recognized that knowing the viscosity and density of each phasecould help to determine flow regime and improve the accuracy of phaseflow rates. The ability to measure viscosity and density at a rapidsampling rate reveals, instantaneously, which phase is present in amultiphase flow, providing a time series of the phase at the sensorlocation. This time series can be used to determine the abundance ofeach phase as well as the size and shape of the flow structures of eachphase and thus the flow regime. A second such time series downstream ofthe first can be correlated with the first to determine how long it tookindividual packages of fluid to move between the sensors, providing amore accurate measurement of phase flow rates.

As discussed above, the oscillator circuit incorporates anelectromechanical resonator disposed within the feedback loop of thecircuit such that the resonant frequency of the resonator defines theoscillation frequency of the oscillator circuit. In addition to definingthe oscillation frequency of the circuit, the resonator also contactsthe fluid to be measured. This arrangement allows the resonant frequencyto be determined much faster as compared to other systems in which theresonator is separate and distinct from the oscillator circuit thatdrives it. Accordingly, the arrangement disclosed herein allows forincreased speed of measurement. The increased speed of measurement isbeneficial in many respects. For example, in a producing well there areoften multiple fluids entering the well. The increased speed ofmeasurement results in an increased number of measurements which allowsone to distinguish between multiple fluid types in a producing well anddetermine correct viscosity for each fluid type. In contrast, systemsthat have slower measurements provide less accurate results as thesensor can be in more than one fluid type during the time of themeasurement.

In addition, the increased speed of the system and method describedherein allows one to resolve separate fluids in a multiphase flow in aproducing well. In contrast, slower sensors will blur fluid propertiesover the various fluids they encounter during the measurement time. Theincreased speed of the sensing allows for the determination ofcomposition and structure of multiphase flows. Again, the increasedspeed of the sensor allows for multiple, fast measurements that allowone to sense and perceive separate fluid phases in the downhole fluidwhile other sensors don't respond fast enough to provide the necessarygranularity in the data to perceive the separate fluid phases. In aproducing well, the sensor can be in a different fluid type every fewmilliseconds as bubbles of oil, gas and brine rush past.

According to one, non-limiting example, one embodiment was tested underlaboratory conditions. Referring to FIG. 4, the system includes a tuningfork 400 as the electromechanical resonator (i.e., a wired tuning forkoscillator). A full characterization of the tuning fork was performedunder simulated downhole conditions of pressure and temperature. Thedevice was actuated and sensed piezo electrically using a lock-inamplification technique as well as a direct frequency responsemeasurement of its impedance. Resonance peaks were obtained and fittedwith the peak width, amplitude and resonance frequency as fittingparameters. Peak width and frequency allow for the extraction of thedamping and added mass of the oscillator in the fluid. A hydrodynamicmodel was developed to calibrate the resonance response with theviscosity and density of a test fluid. For this purpose, the sensor wasactivated in different fluids (air, water, mineral oil, hydraulic oil)and the calibration parameters were obtained. The device was latertested at different conditions of pressure and temperature to simulatedownhole conditions (see FIG. 5 and FIG. 6). More specifically, FIG. 5shows the results for the measured viscosity of ISO 15 hydraulic oil athigh pressures and high temperatures and FIG. 6 shows the results forthe measured density of ISO 15 hydraulic oil at high pressures and hightemperatures.

The device was found to be appropriate for measuring viscosity in theranges of interest (up to 50 cP).

Based on the foregoing, it should be understood that the invention canbe realized in a number of ways, at differing levels of specificity, ascan be gleaned from the following points.

According to one point, a method for making an in situ determination offluid properties at a location of interest is provided, which includesthe steps of:

-   -   a. deploying an electromechanical resonator at a subterranean        well such that the electromechanical resonator is at least        partially immersed in the downhole fluids at the location of        interest;    -   b. causing the electromechanical resonator to oscillate at its        resonance frequency by powering an oscillator circuit which        incorporates the resonator as its frequency defining element;    -   c. measuring the frequency of the oscillation produced by the        oscillator circuit;    -   d. measuring the damping of the oscillation produced by the        oscillator circuit; and    -   e. relating the frequency and the damping to the viscosity and        density of the downhole fluid by at least one of: theoretical        equations relating frequency and damping to fluid viscosity and        density, empirical relationships based on curve fitting to        calibration measurements of frequency and damping in fluids of        known viscosity and density.

According to a further point, a method for determining the PVTcharacteristics or phase diagram of a downhole fluid is provided.

According to another point, a method for determining properties of afluid is provided, that includes the steps of

-   -   a. exposing an electromechanical resonator in an oscillator        circuit to an uncharacterized fluid, the oscillator circuit        comprising:        -   i. an amplifier having an output and an input;        -   ii. a feedback loop between the output and input of the            amplifier or logic gate; and        -   iii. the electromechanical resonator disposed within the            feedback loop such that the resonant frequency of the            resonator defines the oscillation of the oscillator circuit;    -   b. activating the oscillator circuit such that the resonator        reaches its resonant frequency in the uncharacterized fluid;    -   c. determining the damping of the resonator in the        uncharacterized fluid when the oscillator circuit is not        activated; and    -   d. calculating at least one property of the uncharacterized        fluid by reference to the damping.

According to a further point, the uncharacterized fluid is locateddownhole, and further includes the step of disposing the oscillatorcircuit downhole.

According to a further point, the tuning fork is disposed in series withthe feedback loop.

According to a further point, a method for determining the flow ratesfor each phase in a multiphase flow is provided.

According to a further point, a viscosity of the fluid is determined byexposing the tuning fork to fluid at a depth of a reservoir prior to thefluid being brought to the surface.

According to a further point, the oscillator circuit is supported by awireline tool capable of making measurements at multiple points in awell.

According to a further point, the oscillator circuit is supported byuntethered sensor platform capable of making measurements at multiplepoints in a well.

According to a further point, the oscillator circuit is supported by abattery and placed in the wellbore permanently.

According to a further point, the method includes the step ofdetermining a composition of the fluid, wherein the fluid is amultiphase flow.

The subject matter described above is provided by way of illustrationonly and should not be construed as limiting. Various modifications andchanges can be made to the subject matter described herein withoutfollowing the example embodiments and applications illustrated anddescribed (including, for example, specific circuit values illustratedin the accompanying figures), and without departing from the true spiritand scope of the present invention.

1-19. (canceled)
 20. A method for determining properties of a fluid,comprising the steps of: exposing an electromechanical resonator to anuncharacterized fluid, the electromechanical resonator being part of anoscillator circuit that comprises: an amplifier having an output and aninput; a feedback loop between the output and input of the amplifier;and the electromechanical resonator being disposed within the feedbackloop such that a resonant frequency of the electromechanical resonatordefines an oscillation frequency of the oscillator circuit; activatingthe oscillator circuit such that the electromechanical resonator reachesa resonant frequency in the uncharacterized fluid; determining an energyloss parameter of the electromechanical resonator in the uncharacterizedfluid when the oscillator circuit is continuously activated, wherein theenergy loss parameter is determined based on a gain or negativeresistance required to keep a constant oscillation amplitude of theoscillator circuit through an automatic gain or negative resistancecontrol system; and calculating at least one property of theuncharacterized fluid by reference to the energy loss parameter.
 21. Themethod of claim 20, further comprising: cancelling a parasiticcapacitance of the electromechanical resonator using a referencecapacitor and a signal subtraction circuit.
 22. The method of claim 20,wherein the electromechanical resonator geometry is one of: acantilever, a tuning fork, a vibrating wire, and an oscillating plate.23. The method of claim 20, wherein the electromechanical resonator isactuated into at least one vibrational mode selected from: in-plane,out-of-plane, torsional, scissoring, pivoting, and higher order mode.24. The method of claim 20, wherein the electromechanical resonator hasdriving and sensing functions that are decoupled.
 25. The method ofclaim 24, wherein the driving and sensing functions are decoupled byrelying on different physical effects selected from: electrical,magnetic, mechanical and optical domains.
 26. The method of claim 24,wherein the driving and sensing functions are decoupled by physicalseparation of the driving and sensing locations.
 27. The method of claim20, wherein the uncharacterized fluid is located downhole, and furthercomprising the step of disposing the oscillator circuit downhole. 28.The method of claim 20, further comprising the step of determining flowrates for each phase in a multiphase flow.
 29. The method of claim 20,wherein a viscosity of the fluid is determined by exposing theelectromechanical resonator to fluid at a depth within a well before thefluid is brought to a surface.
 30. The method of claim 20, wherein theelectromechanical resonator is housed in a chamber and a portion of theuncharacterized downhole fluid is selectively drawn into the chamber andseparated and/or conditioned, chemically or physically, to perform themeasuring step.
 31. The method of claim 20, wherein the uncharacterizeddownhole fluid comprises at least one of a fluid, dispersed fluid-fluid,solid-fluid, or gas-fluid system and wherein properties of a phasediagram of the uncharacterized downhole fluid are inferred fromviscosity and density changes and their dependence on pressure,temperature, volume, or concentration of a dispersed phase.
 32. Themethod of claim 20, wherein the electromechanical resonator isselectively coated to change its affinity to the uncharacterizeddownhole fluid or a chemical.
 33. The method of claim 20, wherein theoscillator circuit is supported by a wireline tool capable of makingmeasurements at multiple points in a well.
 34. The method of claim 20,wherein the oscillator circuit is supported by an untethered sensorplatform capable of making measurements at multiple points in a well.35. The method of claim 20, further comprising the step of determining acomposition of the fluid, wherein the fluid is a multiphase flow.
 36. Amethod for determining properties of a fluid, comprising the steps of:exposing an electromechanical resonator to an uncharacterized fluid,wherein the resonator is disposed in the feedback loop of an oscillatorcircuit and functions to determine the oscillation frequency of theoscillator circuit; activating the oscillator circuit such that theelectromechanical resonator reaches a resonant frequency in theuncharacterized fluid; determining an energy loss parameter of theelectromechanical resonator in the uncharacterized fluid when theoscillator circuit is continuously activated, wherein the energy lossparameter is determined based on a gain or negative resistance requiredto keep a constant oscillation amplitude of the oscillation circuitthrough an automatic gain or negative resistance control system; andcalculating at least one property of the uncharacterized fluid byreference to the energy loss parameter.